from django.urls import path, include
from rest_framework.routers import DefaultRouter

from day02_books.views import BookView, BookTypeView, LoginView

router = DefaultRouter()
router.register('booktype', BookTypeView, basename='booktype')
router.register('book', BookView, basename='book')



urlpatterns = [
    path('login/', LoginView.as_view({"post": "login"})),
    path('', include(router.urls)),
]